package com.hsbc.dev.teamo4.sms.sm.service.impl;

import com.hsbc.dev.teamo4.sms.sm.dao.IRoleDao;
import com.hsbc.dev.teamo4.sms.sm.dao.impl.RoleDaoImpl;
import com.hsbc.dev.teamo4.sms.sm.po.Role;
import com.hsbc.dev.teamo4.sms.sm.service.IRoleService;
import com.hsbc.dev.teamo4.sms.sm.service.IUserService;

import java.util.List;

/**
 * @author:yang
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.service.impl
 * @Description:
 * @Date date: 2018/7/27
 */
public class RoleServiceImpl implements IRoleService {
    private IRoleDao roleDao=new RoleDaoImpl();
    @Override
    public Role save(Role role) {
        return roleDao.saveEntity(role);
    }

    @Override
    public Role update(Role role) {
        return roleDao.updateEntity(role);
    }

    @Override
    public Role queryById(String id) {
        return roleDao.queryById(id);
    }

    @Override
    public List<Role> queryEntityList() {
        return roleDao.queryAllEntity();
    }

    @Override
    public int updateByIsEnable(String id, Boolean bool) {
        return roleDao.updateByIsEnable(id,bool);
    }

    @Override
    public List<Role> queryLike(String name) {
        return roleDao.queryLike(name);
    }
}
